<template>
  <div class="publish">
    <div>
      <div class="publish-text">
        <textarea class="publishValue" v-model="inputKey" placeholder="说点什么吧..." name="publishValue"
                  auto-focus></textarea>
      </div>
      <div class="submit-btn" @click='bindFormSubmit'>提交</div>
    </div>
  </div>
</template>

<script>
  import { Toast } from 'vant';


  export default {
    name: "detailWrite",
    data() {
      return {
        inputKey: '',
      }
    },
    methods: {
      bindFormSubmit() {
        if (this.inputKey === '') {
          Toast('内容不得为空！');
        } else {
          console.log('ok')
        }
      },
    }
  }
</script>

<style scoped lang="less">
  .publish {
    width: 100%;
    position: relative;
    .publish-text {
      width: 100%;
      padding: 0 6px;
      box-sizing: border-box;
      height: 180px;
      overflow: hidden;
      .publishValue {
        width: 100%;
        height: 180px;
        padding: 6px;
        outline: none;
        border: none;
        color: #666;
        font-size: 14px;
        box-sizing: border-box;
        border-bottom: 1px solid #eeeeee;
      }
    }
    .submit-btn {
      width: 100%;
      height: 45px;
      line-height: 45px;
      position: fixed;
      bottom: 0;
      left: 0;
      background: #1bbacd;
      color: #fff;
      text-align: center;
    }
  }


</style>
